#!/usr/bin/env python
# -*- coding: utf-8 -*-

import shared

# We shall define a square lamina to be a square outline with a square
# "hole" so that the shape possesses vertical and horizontal
# symmetry. For example, using exactly thirty-two square tiles we can
# form two different square laminae:

# With one-hundred tiles, and not necessarily using all of the tiles
# at one time, it is possible to form forty-one different square
# laminae.

# Using up to one million tiles how many different square laminae can
# be formed?

expected = 1572729

# sides of outer square can go as high as
# n/4+1, so 250001 in the million case

def solve():
    max = 10**6/4
    
    count = 0
    j = 1
    while j * (j+1) <= max:
        count += max/j - j
        j += 1
    return count
